@import "yoastseo";
@import "../../node_modules/draft-js-mention-plugin/lib/plugin";
/*!rtl:begin:ignore*/
@import "../../node_modules/draft-js/dist/Draft";
/*!rtl:end:ignore*/

@function svg-icon-list($color) {
	@return inline-svg('<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><path fill="#{$color}" d="M384 1408q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm0-512q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm-1408-928q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/></svg>');
}

@function svg-icon-key($color) {
	@return inline-svg('<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><path fill="#{$color}" d="M832 512q0-80-56-136t-136-56-136 56-56 136q0 42 19 83-41-19-83-19-80 0-136 56t-56 136 56 136 136 56 136-56 56-136q0-42-19-83 41 19 83 19 80 0 136-56t56-136zm851 704q0 17-49 66t-66 49q-9 0-28.5-16t-36.5-33-38.5-40-24.5-26l-96 96 220 220q28 28 28 68 0 42-39 81t-81 39q-40 0-68-28l-671-671q-176 131-365 131-163 0-265.5-102.5t-102.5-265.5q0-160 95-313t248-248 313-95q163 0 265.5 102.5t102.5 265.5q0 189-131 365l355 355 96-96q-3-3-26-24.5t-40-38.5-33-36.5-16-28.5q0-17 49-66t66-49q13 0 23 10 6 6 46 44.5t82 79.5 86.5 86 73 78 28.5 41z"/></svg>');
}

@function svg-icon-edit($color) {
	@return inline-svg('<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><path fill="#{$color}" d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z" /></svg>');
}

#wpseo_meta {
	box-sizing: border-box;

	*, *:before, *:after {
		box-sizing: inherit;
	}
}

// Reset margins inherited from Gutenberg.
// Fixed in Gutenberg https://github.com/WordPress/gutenberg/pull/16207
// Can be removed in future versions.
.DraftEditor-root [data-block] {
	margin: 0;
}

/* Hide the taxonomy metabox rich editor when it's first inserted in the form. */
#edittag > #wp-description-wrap {
	display: none;
}

#wp-description-wrap .wp-editor-area {
	border: 0;
}

/* Give the original textarea enough height to mitigate content flash. */
.term-description-wrap td > textarea#description {
	min-height: 530px;
}

/**
 * Lines below came from metabox-tabs.css
 *
 * Metabox Tabs
 */
ul.wpseo-metabox-tabs {
	display: none;
	margin-top: 6px;
	margin-bottom: 0;
}

/* Contain floated list items and have overflow visible for the active tab */
ul.wpseo-metabox-tabs:after {
	content: "";
	display: table;
	clear: both;
}

.wpseo-metabox-tabs-div {
	margin: 0 5px 5px;

	ul {
		list-style: none;
	}
}

#wpseo-meta-section-addons {
	padding: 0 5px 5px;

	.wpseo-metabox-tabs-div {
		margin: 0;
	}
}

ul.wpseo-metabox-tabs li.active {
	background-color: #fdfdfd;
}

.wpseo-meta-section,
.wpseo-meta-section-react {
	display: none;
	width: 100%;
	min-height: 100%;
	height: auto;
	vertical-align: top;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	border-top: 1px solid #e8e8e8;

	&.active {
		background: #fff;
		position: relative;
		/* 1 higher than the active menu item: .wpseo-metabox-menu.active */
		z-index: 12;
	}
}

.wpseo-meta-section.active {
	display: inline-block;
}

.wpseo-meta-section-react.active {
	display: block;
	margin-bottom: 10px;
}

.wpseo-metabox-content {
	max-width: 800px;
	padding-top: 16px;
}

.wpseo-metabox-menu {
	padding: 0;
	background-color: #fff;

	ul {
		margin: 0 1px 0 0;
		padding: 0 0 0 16px;
		display: flex;
		align-items: flex-end;
		flex-wrap: wrap;
		flex-flow: wrap-reverse;

		li:nth-child(1) {
			z-index: 10;
		}
		li:nth-child(2) {
			z-index: 9;
		}
		li:nth-child(3) {
			z-index: 8;
		}
		li:nth-child(4) {
			z-index: 7;
		}
		li:nth-child(5) {
			z-index: 6;
		}
		li:nth-child(6) {
			z-index: 5;
		}

		li {
			box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
			height: 32px;
			/* Negative margins are to not have double borders. */
			margin-left: -1px;
			margin-bottom: -1px;
			text-align: center;
			position: relative;
			background-color: #f8f8f8;

			a {
				color: #0073aa;
				display: flex;
				align-items: center;
				border: 1px solid #ddd;
			}

			.yst-traffic-light {
				height: 20px;
				width: initial;
				/* all the other icons are 20x20 so we need to compensate */
				margin-right: 10px;
				margin-left: 4px;
			}

			span {
				&.dashicons {
					margin-right: 8px;
				}

				&.wpseo-buy-premium {
					color: #a4286a;

					&:hover {
						color: #832055;
					}
				}
			}

			&.active {
				height: 36px;
				/* 4 px is the difference in height with the inactive tabs. */
				margin-top: -4px;
				z-index: 11;
				background-color: #ffffff;

				a {
					height: 36px;
					color: #444;
				}

				span {
					&.wpseo-buy-premium {
						color: #a4286a;
						border-color: #a4286a;

						&:hover {
							color: #832055;
							border-color: #832055;
						}
					}
				}
			}
		}
	}

	a {
		height: 32px;
		padding: 0 8px;
		text-decoration: none;
	}
}

/* Floated to reset white space between list items */
ul.wpseo-metabox-tabs li {
	float: left;
	margin-right: 5px;
	margin-bottom: -1px;
	padding: 0;
	border: 1px solid #dfdfdf;
	border-bottom: 0 none;

	.wpseo-keyword {
		display: inline-block;
		vertical-align: top;
		max-width: 8em;
		max-width: 8rem;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
}

.wpseotab {
	display: none;
	padding: 16px;
	border: 1px solid #ddd;
	background-color: #fdfdfd;

	.wpseo-cornerstone-checkbox {
		margin-right: 0.5em;
	}
}

.wpseotab.content {
	padding: 20px 15px;
}

.wpseotab.active {
	display: block;
}

/* Tab links. */
.wpseo-metabox-tabs .wpseo_tablink {
	display: inline-block;
	vertical-align: top;
	padding: 5px 12px 6px 12px;
	text-decoration: none;
}

/* Bigger right padding only for the content tab and the main keyword tabs */
.wpseo-metabox-tabs .wpseo_content_tab a {
	padding-right: 12px;
}

.wpseo-metabox-tabs .wpseo-score-icon {
	margin-left: 0;
}

#wpseo-meta-section-social .wpseo-metabox-tabs .wpseo_tablink {
	padding: 5px 7px;
}

.wpseo-metabox-tabs .wpseo_tablink .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.wpseo-metabox-sidebar .dashicons {
	width: 30px;
	height: 30px;
	font-size: 30px;
}

.wpseo-metabox-tabs-div div.wpseo-tabs-panel {
	overflow: auto;
	padding: 0.5em 0.9em;
	border: 1px solid;
}

#wpseo_meta .inside {
	margin: 0;

	&::after {
		content: "";
		display: table;
		clear: both;
	}
}

#wpseo_meta .postbox .inside .wpseotab {
	font-size: 13px !important;
}

/* Basic styling for social, advanced, and add-ons tabs content. */
.wpseo-form {
	input,
	label,
	textarea,
	.select2-container,
	p.error-message {
		max-width: 600px;
	}

	fieldset {
		padding-top: 5px;
	}

	legend {
		font-weight: 600;
	}

	/* By default, labels are set to display block. */
	label {
		display: block;
		font-weight: 600;
	}

	/* Radio buttons and checkboxes labels are set to display inline-block. */
	input[type="radio"] + label,
	input[type="checkbox"] + label {
		display: inline-block;
		font-weight: 400;
	}

	/* Default vertical spacing between blocks of controls. */
	label,
	fieldset {
		margin-top: 2em;
		margin-bottom: 0.5em;
	}

	input[type="checkbox"],
	input[type="checkbox"] + label {
		margin-top: 2em;
		margin-bottom: 0;
		font-size: 1em; /* 1em = 13px. Necessary for proper calculation of margins in em. */
	}

	/* First form controls in a tab need a smaller top margin. */
	label:first-child,
	fieldset:first-child,
	input[type="checkbox"]:first-child,
	input[type="checkbox"]:first-child + label {
		margin-top: 10px;
	}

	/* Radio buttons. */
	input[type="radio"] {
		margin-top: 0;
	}

	input[type="radio"] + label {
		margin: 0 1em 0 0;
	}

	/* Descriptions and error messages below the fields. */
	p.error-message {
		margin: 0.5em 0;
	}

	select[multiple] {
		margin-top: 0;
	}
}

.yoast-metabox__description {
	max-width: 600px;
}

/* Descriptions and error messages below the fields. */
.yoast-metabox__description {
	margin: 0.5em 0;
}

.wpseo_image_upload_button {
	margin-left: 3px;
}

.good,
.warn,
.wrong {
	font-weight: 600;
}

.good {
	color: green;
}

.warn {
	color: maroon;
}

.wrong {
	color: #dc3232;
}

#current_seo_title span {
	padding: 2px 5px;
	background-color: lightyellow;
}

#focuskwresults ul {
	margin: 0;
}

#focuskwresults p,
#focuskwresults li {
	font-size: 13px;
}

#focuskwresults li {
	margin: 0 0 0 20px;
	list-style-type: disc;
}

.wpseo_hidden {
	display: none;
}

.wpseo_msg {
	margin: 5px 0 10px 0;
	padding: 0 5px;
	border: 1px solid #e6db55;
	background-color: lightYellow;
}

ul.wpseo-metabox-tabs li.wpseo-tab-add-keyword {
	border: 1px dashed #dfdfdf;
	border-bottom: none;
}

.wpseo-tab-add-keyword .wpseo-add-keyword.button {
	height: auto;
	padding: 5px 12px 5px 10px;
	vertical-align: top;
	font-size: inherit;
	line-height: inherit;
	font-weight: bold;
	box-shadow: none;
	background: none;
	text-decoration: none;
}

.wpseo-tab-add-keyword .wpseo-add-keyword.button:focus {
	box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8)
}

.wpseo-tab-add-keyword .wpseo-add-keyword.button:active {
	transform: none;
}

.wpseo-add-keyword-plus {
	display: inline-block;
	vertical-align: top;
	margin: -1px 3px 0 0;
	font-size: 20px;
}

#wpseo-add-keyword-popup-title {
	margin: 1em 0;
	font-size: 1.3em;
}

/**
 * Edit Snippet Button focus style.
 *
 * This should be abstracted and applied to all buttons.
 * Or, maybe, take advantage of the `.button` CSS class in WordPress.
 */
.snippet-editor__button.snippet-editor__edit-button:focus {
	border-color: #5b9dd9;
	outline: none;
	color: #23282d;
	background-color: #fafafa;
	box-shadow: 0 0 3px rgba(0, 115, 170, 0.8);
}

.wpseo-admin-page .subsubsub li {
	display: inline;
	max-width: none;
}

.yoast-seo-help-container {
	float: left;
	width: 100%;
	max-width: none;
}

.yoast-seo-help-container .yoast-help-panel {
	margin: 0.5em 0 !important;
}

.wpseo_content_wrapper p.search-box {
	margin: 10px 0 5px 0;
}

.wpseo-metabox-tabs .active a {
	color: #333;
}

#wpseotab .ui-widget-content .ui-state-hover {
	border: 1px solid #dfdfdf;
	color: #333;
	background: #f1f1f1;
}

.yst-traffic-light {
	width: 19px;
	height: 30px;
	margin: 0 0 0 5px;
}

.yst-traffic-light .traffic-light-color {
	display: none;
}

.yst-traffic-light.init .traffic-light-init {
	display: inline;
}

.yst-traffic-light.bad .traffic-light-red {
	display: inline;
}

.yst-traffic-light.ok .traffic-light-orange {
	display: inline;
}

.yst-traffic-light.good .traffic-light-green {
	display: inline;
}

.yst-traffic-light.na .traffic-light-empty {
	display: inline;
}

/**
 * Traffic light in publish box
 */
#wpseo-score {
	float: left;
	margin: 0 5px 0 -5px;
}

@function inline-svg($svg) {
	@return 'data:image/svg+xml;charset=utf8,#{_encode( $svg )}';
}

@function svg-icon-yoast($color) {
	@return inline-svg('<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><path fill="#{$color}" d="M403 218h691l-26 72h-665q-110 0-188.5 79t-78.5 189v771q0 95 60.5 169.5t153.5 93.5q23 5 98 5v72h-45q-140 0-239.5-100t-99.5-240v-771q0-140 99.5-240t239.5-100zm851-218h247l-482 1294q-23 61-40.5 103.5t-45 98-54 93.5-64.5 78.5-79.5 65-95.5 41-116 18.5v-195q163-26 220-182 20-52 20-105 0-54-20-106l-285-733h228l187 585zm474 558v1111h-795q37-55 45-73h678v-1038q0-85-49.5-155t-129.5-99l25-67q101 34 163.5 123.5t62.5 197.5z"/></svg>');
}

/**
* Content and SEO score in publish bar
*/
.yoast-seo-score .yoast-logo.svg {
	float: left;
	width: 18px;
	margin-right: 7px;
	height: 18px;
	background: url(svg-icon-yoast(#999)) no-repeat;
	background-size: 18px;
}

.yoast-seo-score .yoast-logo.svg.good {
	$color: #7ad03a;
	background-image: url(svg-icon-yoast($color));
}

.yoast-seo-score .yoast-logo.svg.ok {
	$color: #ee7c1b;
	background-image: url(svg-icon-yoast($color));
}

.yoast-seo-score .yoast-logo.svg.bad {
	$color: #dc3232;
	background-image: url(svg-icon-yoast($color));
}

.yoast-seo-score .yoast-logo.svg.na {
	$color: #999;
	background-image: url(svg-icon-yoast($color));
}

.yoast-seo-score .yoast-logo.svg.noindex {
	$color: #1e8cbe;
	background-image: url(svg-icon-yoast($color));
}

// Fix for the Taxonomy metabox heading: get just the first level h2.
.term-php .wpseo-taxonomy-metabox-postbox > h2 {
	margin: 0;
	padding: 8px 12px;
	border-bottom: 1px solid #eee;
	font-size: 14px;
	line-height: 1.4;
}

#TB_window {
	#TB_ajaxContent {
		p {
			padding: 5px 0 0 0;
			margin: 5px 0 0 0;
		}

		ul {
			margin: 5px 0 10px 0;
		}

		li {
			list-style: none;
			margin: 5px 0 0 0;

			&::before {
				content: '+';
				margin: 0 10px 0 0;
				font-weight: bold;
			}
		}
	}
}

// TODO: Move this to the yoast-components repository
// The variable $color_headings comes from YoastSEO.js and is #555555.
.yoast-section {
	&__heading {
		&-icon-list {
			background-image: url(svg-icon-list($color_headings));
		}

		&-icon-key {
			background-image: url(svg-icon-key($color_headings));
		}

		&-icon-edit {
			background-image: url(svg-icon-edit($color_headings));
		}
	}
}

.yoast-tooltip.yoast-tooltip-hidden::before,
.yoast-tooltip.yoast-tooltip-hidden::after {
	display: none;
}

/* Workaround for VoiceOver bug see issue #5857 */
.screen-reader-text.wpseo-generic-tab-textual-score,
.screen-reader-text.wpseo-keyword-tab-textual-score {
	display: block;
}

.yoast-notice-go-premium {
	border-left-color: #a4286a;
	background: #f1f1f1;
	margin: 0;
}

.editor-styles-wrapper mark.annotation-text-yoast {
	background-color: #e1bee7;
}

@media screen and ( max-width: 782px ) {
	/* The Go Premium dashicon must stay unchanged in the responsive view. */
	.wpseo-metabox-buy-premium .wpseo-buy-premium {
		display: inline-block;
		width: 20px;
		height: 20px;
		margin-right: 5px;
		padding: 0;
	}

	.yoast-help-panel {
		max-width: none !important;
	}

	#wpseo-crawl-issues-table-form .subsubsub {
		float: none;
		max-width: calc( 100vw - 20px );
	}

	#wpseo-crawl-issues-table-form .yoast-help-button {
		margin-top: 3px;
	}

	/* Necessary to override a WP rule. */
	.wpseotab select[multiple] {
		height: auto !important;
	}
}

@media screen and ( max-width: 600px ) {
	.wpseotab.content {
		padding: 16px 0;
	}
}

.wpseo-score-icon-container {
	height: 20px;
	width: 20px;
	margin-right: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
}
